﻿using CozeDomain.Entities;
using CozeDto.SysDicDtos;
using D.UtilCore.Dtos;
using D.UtilFreesqlOrm;

namespace CozeDomain.IServices
{
    /// <summary>
    /// 系统字典参数接口
    /// </summary>
    public interface ISysDicService : IBaseService<SysDicEntity>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="reqAddSysDic"></param>
        /// <returns></returns>
        Task<ApiResult<int>> AddSysDicAsync(ReqAddSysDic reqAddSysDic);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<ApiResult<int>> DeleteSysDicAsync(List<string> ids);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="reqUpdateSysDic"></param>
        /// <returns></returns> 
        Task<ApiResult<int>> UpdateSysDicAsync(ReqUpdateSysDic reqUpdateSysDic);

        /// <summary>
        /// 单个查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns> 
        Task<ApiResult<RepSysDicInfo>> GetSysDicAsync(string id);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pageQuery"></param>
        /// <param name="async"></param>
        /// <returns></returns>
        Task<ApiResult<PageModel<RepQuerySysDicTreeTable>>> GetPagesAsync(ReqQuerySysDicPage pageQuery);

        /// <summary>
        /// 查询下拉框列表
        /// </summary>
        /// <param name="dicTypeUniqueCode">字典类型</param>
        /// <returns></returns>
        Task<ApiResult<List<RepSelect>>> QueryDicSelect(string dicTypeUniqueCode);

        /// <summary>
        /// 查询下拉框树
        /// </summary>
        /// <param name="dicTypeUniqueCode">字典类型</param>
        /// <returns></returns>
        Task<ApiResult<List<RepTreeSelect>>> QueryDicTreeSelect(string dicTypeUniqueCode);

        /// <summary>
        /// 查询下拉框树2
        /// </summary>
        /// <param name="dicTypeUniqueCode">字典类型</param>
        /// <returns></returns>
        Task<ApiResult<List<RepTreeList>>> QueryDicTreeSelect2(string dicTypeUniqueCode);
    }
}
